extends State
class_name Playerdead
@onready var state_machine: Node = $".."

func enter():
	print("死亡")
	await get_tree().create_timer(1.0).timeout
	respawn()

func respawn():
	var respawn_position = Autoload.get_checkpoint()
	character.global_position = respawn_position
	transition_requested.emit("Playeridle")
